/*
 * @Author: ZhaoZhiqi
 * @Date: 2023-11-13 18:15:38
 * @LastEditors: ZhaoZhiqi
 * @LastEditTime: 2024-02-25 14:51:29
 * @Description: 
 * @FilePath: \labtalk-admin\src\Router.jsx
 */
import { createBrowserRouter, RouterProvider } from 'react-router-dom';
import { Layout } from './layout/Layout';
import { Code } from './pages/Code/Code';
import { Login } from './pages/Login/Login';

export function Router() {
  const router = createBrowserRouter([
    {
      path: '/',
      element: <Layout />,
      children: [
        {
          path: 'code',
          element: <Code />,
        },
      ]
    },
    {
      path: 'login',
      element: <Login />,
    },
  ]);

  return <RouterProvider router={router} />;
}
